cv2_utils 中文路径兼容 + 测试方法论 + harness 文档整理 - #2461
Conversation
cv2.imread/imwrite 在 Windows 走 C stdlib,中文路径会失败。改用 np.fromfile+cv2.imdecode(读)/ cv2.imencode+ndarray.tofile(写),走 OS API 认中文路径。向后兼容(ASCII 照常);save_image 写盘失败静默(同原 imwrite best-effort);webp 维持 q=100(注:q100 实为高质量有损,非无损;真无损要 q101——既有行为,本次不改)。 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- docs/develop/testing/ (新): README (怎么跑 + test_context 基建 + 写法 + 提交坑 + 代码规范迁移自 agent_guidelines) + fixture_controller.md (FixtureController 流程测试详细) - docs/develop/zzz/screenshot_archive.md (新): 截图存档(游戏知识库生态 + webp q90 格式 + 加图流程 + 裁模板用原图) - docs/develop/README.md: 索引加测试/截图 + §1.3 指针 - AGENTS.md: 测试方法论指针 + 修正 line 17 stale pointer - agent_guidelines.md: §测试代码规范迁移到 testing/ §5(不留指针,agent_guidelines 后续废弃) - docs/game/README.md: §4 截图基线 加反向指针 - skills/zzz-od-dev-screen-onboarding: step 6 归档代表截图 + step 5 裁模板用原图非 webp Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- 入口链路:.github/README 参与开发指向 RECRUITING+quickstart;RECRUITING 快速开始 delegate quickstart - skills 单源:清单以 skills/ 目录为源,去 quickstart/ai_coding/harness 的硬编码罗列(曾漏 screen-onboarding) - 相关仓库:新建 setup/repositories.md(测试仓/yolo/数据集/官网 blog);quickstart 加 fork 区分;AGENTS 加指针 - 开发流程:新建 development_workflow.md(游戏自动化功能+OpenAndEnterGame 实例+配套判据+跨仓PR顺序);AGENTS 加 always-on 骨架;screen-onboarding skill 标题 画面入职→画面建档 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
📝 WalkthroughWalkthrough本 PR 更新了贡献者与开发文档入口、测试与流程说明、截图存档规范和技能文档,并将图像读写实现改为兼容非 ASCII 路径。 Changes贡献者文档与开发流程重构
图像读写兼容非ASCII路径
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/develop/setup/quickstart.md (1)
62-64: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win修正这 4 个相对链接。
setup/quickstart.md、../../AGENTS.md、README.md和spec/agent_guidelines.md在当前文件位置下都会解析到错误路径;前者会落到不存在的setup/setup/quickstart.md,AGENTS.md少一层..,后两个也少一层父目录。请分别改成./quickstart.md、../../../AGENTS.md、../README.md、../spec/agent_guidelines.md,或者把自引用改成纯文本/锚点。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/develop/setup/quickstart.md` around lines 62 - 64, The relative links in quickstart.md are resolving from the wrong base path, so update the self-reference and sibling/document links in this section using the current file’s location and the unique anchors around “src/ 进入模块搜索路径”; specifically, fix the quickstart self-link, the AGENTS.md link, README.md link, and spec/agent_guidelines.md link so they point to the intended targets from this document (or replace the self-reference with plain text/anchor text if appropriate).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/develop/setup/quickstart.md`:
- Around line 90-94: quickstart.md 里的克隆示例把组织成员和外部贡献者两种互斥的 clone
方式放在同一个代码块里,导致整块复制会误执行两条命令;请在相关的克隆示例处将这两种方式拆成两个独立代码块,或把其中一条改成纯说明文本,避免用户直接复制时同时执行。注意定位到该文档中包含
git clone 的示例段落即可。
In `@skills/zzz-od-dev-screen-onboarding/SKILL.md`:
- Line 3: `description` 目前同时包含了触发条件和执行步骤,职责过宽。请在 `SKILL.md` 中把 `description`
收窄为只描述“何时使用”这类触发场景,去掉“分析/建档/建模/归档”等动作说明;具体流程应移到正文部分,保持与 `SKILL.md` 和
`skills/zzz-od-dev-skill-guide/SKILL.md` 的约定一致。
---
Outside diff comments:
In `@docs/develop/setup/quickstart.md`:
- Around line 62-64: The relative links in quickstart.md are resolving from the
wrong base path, so update the self-reference and sibling/document links in this
section using the current file’s location and the unique anchors around “src/
进入模块搜索路径”; specifically, fix the quickstart self-link, the AGENTS.md link,
README.md link, and spec/agent_guidelines.md link so they point to the intended
targets from this document (or replace the self-reference with plain text/anchor
text if appropriate).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9ee88ce1-9d1a-4c19-80a6-8ef7a6cc1600
📒 Files selected for processing (16)
.github/README.mdAGENTS.mddocs/develop/README.mddocs/develop/RECRUITING.mddocs/develop/development_workflow.mddocs/develop/harness/README.mddocs/develop/setup/ai_coding.mddocs/develop/setup/quickstart.mddocs/develop/setup/repositories.mddocs/develop/spec/agent_guidelines.mddocs/develop/testing/README.mddocs/develop/testing/fixture_controller.mddocs/develop/zzz/screenshot_archive.mddocs/game/README.mdskills/zzz-od-dev-screen-onboarding/SKILL.mdsrc/one_dragon/utils/cv2_utils.py
💤 Files with no reviewable changes (1)
- docs/develop/spec/agent_guidelines.md
… Application + gloss 对齐 op_name + 弱化 OpenGame 措辞 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…g description 收窄(只留触发) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
@coderabbitai 3 条 comment 处理:
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
sed -n '1,80p' docs/develop/setup/quickstart.md
echo "-----RECRUITING-----"
sed -n '1,60p' docs/develop/RECRUITING.mdLength of output: 4170
|
…e 图压缩原则 - skills/zzz-od-dev-screen-onboarding/convert_to_webp.py: PNG→webp q90(单张/目录,中文路径安全) - onboard §6 归档改用脚本 - testing/README §6: 测试 fixture 整屏图尽量 q90(满足测试为准),OCR/精度敏感保留 PNG Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…录,保留原 png) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…6 同步 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- pr-finishing done criteria 加「关联 PR 也都 done」+ §6 关联 PR 协同(一起收尾 / 合并顺序测试仓先 / 都 done 才合) - development_workflow §4 交叉引用 pr-finishing §6(合并顺序) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/zzz-od-dev-screen-onboarding/SKILL.md`:
- Around line 57-60: The fenced code block in the onboarding docs is missing a
language identifier, triggering markdownlint MD040. Update the example under the
convert_to_webp.py usage in SKILL.md to declare the fence as shell so the
snippet is recognized as a shell command; keep the existing command content
unchanged and ensure the fix is applied to the specific fenced block near the
convert_to_webp.py example.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bcf4c50a-e937-4b7c-8c07-b20ca4e91660
📒 Files selected for processing (5)
docs/develop/development_workflow.mddocs/develop/testing/README.mdskills/zzz-od-dev-pr-finishing/SKILL.mdskills/zzz-od-dev-screen-onboarding/SKILL.mdskills/zzz-od-dev-screen-onboarding/convert_to_webp.py
✅ Files skipped from review due to trivial changes (2)
- docs/develop/testing/README.md
- docs/develop/development_workflow.md
…abbit outside-diff 平台限制说明 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
@coderabbitai SKILL.md §6 convert_to_webp.py 的 code fence 已加 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
sed -n '1,60p' skills/zzz-od-dev-pr-finishing/SKILL.md | grep -n '```'
grep -n '```' skills/zzz-od-dev-pr-finishing/SKILL.mdLength of output: 352 🏁 Script executed: #!/bin/bash
sed -n '40,55p' skills/zzz-od-dev-pr-finishing/SKILL.mdLength of output: 1034 🏁 Script executed: #!/bin/bash
grep -n '```' skills/zzz-od-dev-screen-onboarding/SKILL.md
sed -n '1,80p' skills/zzz-od-dev-screen-onboarding/SKILL.mdLength of output: 4020 Confirmed — the code fence for
|
…制)+ rate limit(per-developer 配额) Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai resume |
|
@coderabbitai review |
✅ Action performedReview finished.
|
改动
fix(cv2_utils):中文路径兼容
read_image/save_image兼容非 ASCII(中文)路径(cv2.imread→np.fromfile+imdecode;cv2.imwrite→imencode+tofile)。docs:测试方法论 + 截图存档
docs/develop/testing/(README + fixture_controller):测试基建 / FixtureController 多帧流程测试 / 提交坑 / 测试代码规范。docs/develop/zzz/screenshot_archive.md:画面截图存档(webp q90 / 中文路径 / 加图流程)。docs:harness 文档整理
.github/README参与开发指向 RECRUITING+quickstart;RECRUITING 快速开始 delegate quickstart。skills/目录为源,去掉 quickstart/ai_coding/harness 硬编码罗列(曾漏 screen-onboarding)。setup/repositories.md(测试仓 / yolo / 数据集 / 官网 blog);quickstart 加 fork 区分;AGENTS 加指针。development_workflow.md(游戏自动化功能 + OpenAndEnterGame 实例 + 配套判据 + 跨仓 PR 顺序);AGENTS 加 always-on 骨架;skill 标题「画面入职」→「画面建档」。测试
测试在独立仓,测试仓 PR #10:OneDragon-Anything/zzz-od-test#10 (同分支名
feat/fixture-op-testing,CI 按分支名 clone 测试仓)。Summary by CodeRabbit